<?php echo $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-language" content="vi" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="google-site-verification" content="8Z0N3ZM4DCVtGK3n8JzHedNxdGwFHGTE18nic07eMmw" />
<?php echo $this->headTitle()?>
<?php echo $this->headMeta() ?>
<?php echo $this->headLink() ?>
<?php echo $this->headScript() ?>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-37861643-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

</head>
<script type="text/javascript">
	$(document).ready(function() {
		$('.item0').addClass('active');
	 	$('.item-link').click(function(e){
			e.preventDefault();
			$('.item-link').removeClass('active').next('ul').slideUp();
			$(this).addClass('active').parent().find('ul').slideToggle();
		});
		$('.item-link2').click(function(e){
			e.preventDefault();
			$('.item-link2').removeClass('active').next('ul').slideUp();
			$(this).addClass('active').parent().find('ul').slideToggle();
		});
	});
	
	$(window).load(function() {
		$('#slider').nivoSlider({
			effect: 'random',
			slices:8,
			animSpeed:900, //Slide transition speed
			pauseTime:3000,
			startSlide:0, //Set starting Slide (0 index)
			directionNav:true, //Next & Prev
		});
	});
</script>
<body>
    	<?php
			$ssFilter = $this->arrParam['ssFilter'];
			$langTmp = $ssFilter['lang'];
			if($langTmp == ''){
				$langTmp = 'vi';
			}else{
				$langTmp = $ssFilter['lang'];
			}
			$page = $this->arrParam['page'];
			if(empty($page)){
				$page = 1;
			}
			$urlHome 		= array('module'=>'default','controller'=>'index','action'=>'index','lang'=>$langTmp);
   			$linkHome 		= $this->url($urlHome,'home');
   			
            $urlProducts 		= array('module'=>'products','controller'=>'index','action'=>'index','lang'=>$langTmp,'page'=>$page);
   			$linkProducts 		= $this->url($urlProducts,'products');
            
            $urlNews	= array('module'=>'news','controller'=>'index','action'=>'category','lang'=>$langTmp,'page'=>$page);
            $linkNews 	= $this->url($urlNews,'news-category');
            
            $urlContact	= array('module'=>'default','controller'=>'index','action'=>'contact','lang'=>$langTmp);
            $linkContact 	= $this->url($urlContact,'contact');
            
            $urlAccount	= array('module'=>'default','controller'=>'index','action'=>'account','lang'=>$langTmp);
            $linkAccount 	= $this->url($urlAccount,'account');
            
   			$urlRegistert 		= array('module'=>'default','controller'=>'public','action'=>'register','lang'=>$langTmp);
   			$linkReg 		= $this->url($urlRegistert,'register');
   			
   			$urlLogin 		= array('module'=>'default','controller'=>'public','action'=>'login','lang'=>$langTmp);
   			$linkLogin 		= $this->url($urlLogin,'login');
   			
   			
   			
		    require_once 'includes/js.php';
		    
		    $module = $this->arrParam['module'];
			$position = 'top-home';
			if($module == 'default') $position = 'top-home';
			if($module == 'news') $position = 'top-news';
			if($module == 'services') $position = 'top-service';
			if($module == 'products') $position = 'top-tour';
			
			
			$info = new Zendvn_System_Info();
			$memberInfo = $info->getMemberInfo('id');
			if($memberInfo != ''){
				$tbltUser 	= new Zendvn_Models_Users();
				$user 		= $tbltUser->listItem($this->arrParam,array('user_id'=>$memberInfo,'task'=>'public'));
				$group_id 	= $user['group_id'];
				
				$urlLogout 	= array('module'=>'default','controller'=>'public','action'=>'logout','lang'=>$langTmp);
   				$linkLogout = $this->url($urlLogout,'logout');
   				
   				$urlAdministrator 	= array('module'=>'default','controller'=>'admin','action'=>'index','lang'=>$langTmp);
   				$linkAdministrator 	= $this->url($urlAdministrator,'administrator');
   				
   				$htmlLogout = '<li><a href="'. $linkLogout .'">Thoát</a></li>';
   				$htmlAdmin = '<li><a  target="_blank" href="'. $linkAdministrator .'">Quản trị</a></li>';
   				$hiUser = '<li><span>Chào mừng ' . $user['user_name'] . '</span></li>';
   				
   				if($group_id <= 3){
   					$nav = $hiUser . ' ' . $htmlAdmin . ' ' . $htmlLogout;
   				}else{
   					$nav = $hiUser . ' ' . $htmlLogout;
   				}
			}else{
				$nav = '<li><a href="' . $linkLogin . '">Đăng nhập</a></li>
                    	<li><a href="' . $linkReg . '">Đăng ký</a></li>';
			}
			
		?>
<div class="wrapage">
    <div class="top">   
            <div class="frame-top">
            
            	<div class="frame-top01 width-100">
                	<!---------Logo (Start)----------->
                        <div class="logo width-40 float-left"></div>
                    <!---------Logo (End)----------->
                    <!---------Menu-Top (Start)----------->
                        <div class="menu-top width-60 float-right">
                            <ul>
                                <li><a href="<?php echo $linkHome; ?>">Trang Chủ</a></li>
                                <li><a href="<?php echo $linkProducts; ?>">sản phẩm</a></li>
                                <li><a href="<?php echo $linkNews; ?>">Tin tức</a></li>
                                <li><a href="<?php echo $linkContact; ?>">Liên hệ</a></li>
                            </ul>
                        </div>
                    <!---------Menu-Top (End)----------->
                </div>
                
                <div class="frame-top02 width-100">
                	<!---------Search (Start)----------->
                        <div class="gr-search width-20 float-right">
                        	<div class="search float-left">
                                <input placeholder="Tìm kiếm" type="keyword" class="keyword" />
                                <input type="submit" class="btn-keyword" value="" />
                            </div>
                            <div class="cart float-right">
                            	<a href="#">0</a>
                            </div>
                        </div>
                    <!---------Search (End)----------->
                </div>
                <div class="clear"></div>
            </div>
            <?php
            $controller = $this->arrParam['controller'];
            $module_ 	= $this->arrParam['module'];
            $action 	= $this->arrParam['action'];
            $mod_act 	= $module_. '_'.$controller.'_'.$action;
            if($mod_act == 'default_index_index'){
            ?>
            <div class="slideshow width-100">
                <img src="<?php echo $this->imgUrl;?>/default/slideshow.png" width="986" height="358" />
                  <div class="slide-btn-left width-5 float-left"><a href="#"><img src="<?php echo $this->imgUrl;?>/icons/btn-slide-left.png" /></a></div>
                  <div class="slide-btn-right width-5 float-right"><a href="#"><img src="<?php echo $this->imgUrl;?>/icons/btn-slide-right.png" /></a></div>
                  <div class="slide-small width-60">
                    <ul>
                        <li><a href="#"><img src="<?php echo $this->imgUrl;?>/default/slide-img01.png" width="113" height="113" /></a></li>
                          <li><a href="#"><img src="<?php echo $this->imgUrl;?>/default/slide-img02.png" width="113" height="113" /></a></li>
                          <li><a href="#"><img src="<?php echo $this->imgUrl;?>/default/slide-img03.png" width="113" height="113" /></a></li>
                          <li><a href="#"><img src="<?php echo $this->imgUrl;?>/default/slide-img04.png" width="113" height="113" /></a></li>
                      </ul>
                  </div>
            </div>
            <div style="clear:both; height:50px; width:100%;"></div>
          <?php } ?>
    </div>
    <div class="bottom-top width-100">
            	<!---------Đăng nhập/ Đăng ký (Start)----------->
                    <div class="frame-bottom-top">
                    		<div class="bt-tintuc width-80 float-left">
                            	<p><b>Tin tức: </b> Chương trình khuyến mãi ngày 8/3</p>
                            </div>
                            <div class="login width-20 float-right">
                            	<div class="login01 width-50"><a href="<?php echo $linkLogin;?>">Đăng nhập</a></div>
                                <div class="login02 width-50"><a href="#">Đăng ký</a></div>
                            </div>
                    </div>
                <!---------Đăng nhập/ Đăng ký (Start)----------->
    </div>